Micron Document
Gopher Proxy


codevoid.de:70 codevoid.de:70/0/patches/2019-08-12-sacc_colorline.diff
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Color selection line [sacc]

The gopher client sacc is uncomfortable to use in the dark,
because the default selection line inverts the fg/bg and is
therefore a bright white bar.

This patch changes the inverted bar into an orange text color
with unchanged background. It fits my theme color scheme and
is much friendlier on the eye.

--- ui_ti.c.orig 2018-11-15 10:33:17.208268025 +0100
+++ ui_ti.c 2018-11-15 10:40:31.986598063 +0100
@@ -13,6 +13,9 @@
#define C(c) #c
#define S(c) C(c)
+#define SELECTION "\x1B[31m\x1B[40m\x1B[1m"
+#define RESET "\x1B[0m"
+
static char bufout[256];
static struct termios tsave;
static struct termios tsacc;
@@ -270,14 +273,12 @@
putp(tparm(cursor_down, 0, 0, 0, 0, 0, 0, 0, 0, 0));
if (i == curln) {
putp(tparm(save_cursor, 0, 0, 0, 0, 0, 0, 0, 0, 0));
- putp(tparm(enter_standout_mode,
- 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ putp(tparm(SELECTION));
}
printitem(&items[i]);
putp(tparm(column_address, 0, 0, 0, 0, 0, 0, 0, 0, 0));
if (i == curln)
- putp(tparm(exit_standout_mode,
- 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ putp(tparm(RESET));
}
putp(tparm(restore_cursor, 0, 0, 0, 0, 0, 0, 0, 0, 0));
@@ -333,10 +334,10 @@
putp(tparm(cursor_address, curline - dir->printoff,
0, 0, 0, 0, 0, 0, 0, 0));
- putp(tparm(enter_standout_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ putp(tparm(SELECTION));
printitem(&dir->items[curline]);
- putp(tparm(exit_standout_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0));
- displaystatus(item);
+ putp(tparm(RESET));
+ displaystatus(item);
fflush(stdout);
}

you're on codevoid.de^70/0/patches/2019-08-12-sacc_colorline.diff
back link is codevoid.de:70/1